package cn.humaohua.study.yanmo_design_pattern.ch13.v2;

public class Operation implements OperationApi {
    // 获取操作结果
    private double result;

    @Override
    public double getResult() {
        return result;
    }

    @Override
    public void setResult(double result) {
        this.result = result;
    }

    @Override
    public void add(double opeNum) {
        result += opeNum;
    }

    @Override
    public void substract(double opeNum) {
        result -= opeNum;
    }

}
